Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share common fabric-scoped table-like storage from SceneTableImpl #38073

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gmarcosb
Copy link
Contributor

Move functionality to a templatized class, chip::common::FabricTableImpl, to allow re-use in other clusters (specifically, TlsClientManagementServer)

Testing

Tested in CI

…to a templatized class, chip::common::FabricTableImpl, to allow re-use in other clusters (specifically, TlsClientManagementServer)
@gmarcosb gmarcosb force-pushed the camera-webrtc-server branch from 4ba315a to 9934b77 Compare March 19, 2025 19:58
@github-actions github-actions bot added the app label Mar 19, 2025
Copy link

PR #38073: Size comparison from 09dd3ac to c18aec4

Full report (3 builds for nrfconnect)
platform target config section 09dd3ac c18aec4 change % change
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 916444 917776 1332 0.1
RAM 167463 167467 4 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 852924 854256 1332 0.2
RAM 141243 141247 4 0.0
all-clusters-app nrf7002dk_nrf5340_cpuapp FLASH 909200 910104 904 0.1
RAM 145707 145711 4 0.0

@github-actions github-actions bot added the tests label Mar 19, 2025
@gmarcosb gmarcosb force-pushed the camera-webrtc-server branch from 5436ca2 to ff085b5 Compare March 19, 2025 21:07
Copy link

PR #38073: Size comparison from 09dd3ac to ff085b5

Full report (1 build for stm32)
platform target config section 09dd3ac ff085b5 change % change
stm32 light STM32WB5MM-DK FLASH 461160 461160 0 0.0
RAM 141496 141496 0 0.0

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stopped at beginning of impl changes; it looks like this is changing the SceneTable interface when it meant to change the SceneTableImpl interface implementation.....

};
template <class EFStype>
class SceneTable
: public virtual app::common::FabricTable<scene_table_elements::SceneStorageId, scene_table_elements::SceneData<EFStype>>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need virtual inheritance here?

virtual CHIP_ERROR GetSceneTableEntry(FabricIndex fabric_index, SceneStorageId scene_id, SceneTableEntry & entry) = 0;
virtual CHIP_ERROR RemoveSceneTableEntry(FabricIndex fabric_index, SceneStorageId scene_id) = 0;
virtual CHIP_ERROR RemoveSceneTableEntryAtPosition(EndpointId endpoint, FabricIndex fabric_index, SceneIndex scene_idx) = 0;
inline CHIP_ERROR SetSceneTableEntry(FabricIndex fabric_index, const SceneTableEntry & entry)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is changing from an abstract interface (with SceneTableImpl as a possible, but not only, implementation) to a concrete implementation, right? Was this discussed with @lpbeliveau-silabs ?

kSceneCount,
kStorageIDArray,
kGroupID,
kGroupID = 4,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be assuming something about something. Where is this 4 coming from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants